import Vue from 'vue'
import VueRouter from 'vue-router'
import CarView from '../views/CarView.vue'
import IndexView from "@/views/IndexView.vue";
import ReportCar from "@/views/ReportCar.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: IndexView,
    redirect:"/car",
    children: [
      {
        path: '/car',
        name: 'car',
        component: CarView
      },
      {
        path: '/report-car',
        name: 'report-car',
        component: ReportCar
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
